home *** CD-ROM | disk | FTP | other *** search
/ Champak 29 / Volume 29 - JOGO DISK .iso / Games / jungle_adventure.swf / scripts / __Packages / RopeObject.as < prev    next >
Text File  |  2006-11-29  |  2KB  |  58 lines

  1. class RopeObject extends CommandBox
  2. {
  3.    var exitTime = 0;
  4.    var assetID = null;
  5.    var localRight = 20;
  6.    var command = "climb";
  7.    var editor_isItem = true;
  8.    var editor_name = "Rope";
  9.    var editor_args_names = ["height"];
  10.    var editor_args_values = [CommandBox.prototype.localBottom];
  11.    var editor_args_types = ["number"];
  12.    var editor_args_options = [[100,4000,10]];
  13.    var editor_args_descriptions = [""];
  14.    var editor_args_mode = [0];
  15.    var editor_args_component = ["NumericStepper"];
  16.    var editor_canChangeFrame = false;
  17.    var editor_canChangeAsset = false;
  18.    var editor_canChangeLayer = true;
  19.    function RopeObject(h)
  20.    {
  21.       super();
  22.       if(h)
  23.       {
  24.          this.localBottom = h;
  25.       }
  26.       this.init(SSZone.RECT,new Vector(this.localRight,this.localBottom,0));
  27.    }
  28.    function onAddDisplay()
  29.    {
  30.       this.target.beginFill(13333275);
  31.       this.target.moveTo(8,0);
  32.       this.target.lineTo(8,this.localBottom);
  33.       this.target.lineTo(12,this.localBottom);
  34.       this.target.lineTo(12,0);
  35.       this.target.endFill();
  36.    }
  37.    function editor_onDisplay(target, external)
  38.    {
  39.       target.createTextField("t",20,0,0,100,48);
  40.       var _loc3_ = target.t;
  41.       var _loc4_ = _loc3_.getNewTextFormat();
  42.       _loc4_.size = 20;
  43.       _loc4_.color = 16777215;
  44.       _loc4_.font = "_sans";
  45.       _loc3_.setNewTextFormat(_loc4_);
  46.       _loc3_.selectable = false;
  47.       _loc3_.text = "Command:\n" + this.command;
  48.       target.clear();
  49.       target.lineStyle(0,16742348);
  50.       target.beginFill(16742348,80);
  51.       target.lineTo(this.width,0);
  52.       target.lineTo(this.width,this.height);
  53.       target.lineTo(0,this.height);
  54.       target.lineTo(0,0);
  55.       target.endFill();
  56.    }
  57. }
  58.